<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>信息推送-推送历史</title>
    <link rel="stylesheet" href="../common/css/reset.css" />
    <link rel="stylesheet" href="../common/css/element-ui.css" />
    <link rel="stylesheet" href="../common/css/common.css" />
    <link rel="stylesheet" href="./css/index.css" />
  </head>
  <body>
    <div id="app" class="page-container" v-cloak>
      <div class="page-content">
        <el-row :gutter="10">
          <!-- 页面标题 -->
          <el-col :span="24">
            <div class="panel-title">信息推送-推送历史</div>
          </el-col>
        </el-row>
        <div class="panel-container">
          <el-row :gutter="10">
            <el-col :span="24">
              <el-form
                :model="filterForm"
                size="mini"
                :inline="true"
                ref="filterFormRef"
                class="form-filter"
              >
                <el-form-item label="信息标题:" prop="title">
                  <el-input
                    v-model="filterForm.title"
                    placeholder="请输入信息标题"
                    @change="getInfoList"
                  ></el-input>
                </el-form-item>
                <el-form-item label="信息推送人:" prop="push_names">
                  <el-input
                    v-model="filterForm.push_names"
                    placeholder="请输入信息推送人"
                    @change="getInfoList"
                  ></el-input>
                </el-form-item>
                <el-form-item label="推送方式:" prop="push_channel">
                  <el-radio-group
                    v-model="filterForm.push_channel"
                    @change="getInfoList"
                  >
                    <el-radio label="1">APP推送</el-radio>
                    <el-radio label="2">服务号推送</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="信息推送结果:" prop="push_result">
                  <el-select
                    v-model="filterForm.push_result"
                    @change="getInfoList"
                    clearable
                  >
                    <el-option label="推送成功" value="1"></el-option>
                    <el-option label="推送失败" value="2"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="推送时间:" prop="time">
                  <el-date-picker
                    v-model="filterForm.time"
                    type="daterange"
                    value-format="yyyy-MM-dd"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    @change="getInfoList"
                  >
                  </el-date-picker>
                </el-form-item>
                <el-form-item label="信息类型:" prop="msg_type">
                  <el-radio-group
                    v-model="filterForm.msg_type"
                    @change="getInfoList"
                  >
                    <el-radio label="1">资产</el-radio>
                    <el-radio label="2">招标/拍卖</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="信息接收人:" prop="accept_user">
                  <el-input
                    v-model="filterForm.accept_user"
                    placeholder="请输入信息接收人"
                    @change="getInfoList"
                  ></el-input>
                </el-form-item>
                <el-form-item prop="accept_user_type">
                  <el-select
                    v-model="filterForm.accept_user_type"
                    @change="getInfoList"
                  >
                    <el-option
                      label="联系人"
                      value="accept_user_name"
                    ></el-option>
                    <el-option
                      label="公司名称"
                      value="accept_user_company"
                    ></el-option>
                    <el-option
                      label="手机号"
                      value="accept_user_phone"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="客户是否查看:" prop="is_viewed">
                  <el-select
                    v-model="filterForm.is_viewed"
                    @change="getInfoList"
                    clearable
                  >
                    <el-option label="已查看" value="1"></el-option>
                    <el-option label="未查看" value="2"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <div class="panel-line flex-end">
                    <el-button type="primary" @click="getInfoList">
                      查询
                    </el-button>
                    <el-button @click="resetfilterForm">重置</el-button>
                  </div>
                </el-form-item>
              </el-form>
              <el-table
                stripe
                :data="infoTable.list"
                size="mini"
                :header-cell-style="{ background: '#F5F5F5', color: '#000000' }"
                ref="infoTable"
                style="width: 100%"
                v-loading="infoTable.loading"
              >
                <el-table-column
                  align="center"
                  header-align="center"
                  label="信息标题"
                  prop="title"
                  width="200"
                ></el-table-column>
                <el-table-column
                  align="center"
                  header-align="center"
                  label="分类"
                  prop="cate"
                ></el-table-column>
                <el-table-column
                  align="center"
                  header-align="center"
                  label="地区"
                  prop="zone_names"
                ></el-table-column>
                <el-table-column
                  align="center"
                  header-align="center"
                  label="推送时间"
                  prop="push_time"
                ></el-table-column>
                <el-table-column
                  align="center"
                  header-align="center"
                  label="接收人"
                  prop="accept_user"
                ></el-table-column>
                <el-table-column
                  align="center"
                  header-align="center"
                  label="推送方式"
                  prop="push_channel"
                ></el-table-column>
                <el-table-column
                  align="center"
                  header-align="center"
                  label="推送结果"
                  prop="push_result"
                >
                  <template slot-scope="scope">
                    {{ scope.row.push_result === 1 ? '已推送' : '未推送' }}
                  </template>
                </el-table-column>
                <el-table-column
                  align="center"
                  header-align="center"
                  label="客户是否查看"
                  prop="is_viewed"
                  ><template slot-scope="scope">
                    {{ scope.row.is_viewed === 1 ? '已查看' : '未查看' }}
                  </template></el-table-column
                >
              </el-table>
              <el-pagination
                small
                background
                :current-page="infoTable.pageNumber"
                :page-size="infoTable.pageSize"
                :page-sizes="[10, 20, 50, 100]"
                :total="infoTable.total"
                @current-change="currentChangeHandle('infoTable', $event)"
                @size-change="sizeChangeHandle('infoTable', $event)"
                layout="total, sizes, prev, pager, next, jumper"
                style="margin-top: 20px; text-align: right"
              ></el-pagination>
            </el-col>
          </el-row>
        </div>
      </div>
    </div>
    <script src="../common/js/vue.min.js"></script>
    <script src="../common/js/element-ui.js"></script>
    <script src="./js/ajax.js"></script>
    <script src="./js/index.js"></script>
  </body>
</html>
